<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Basic</title>
  <style type="text/css">a.test { font-weight: bold; }</style>
  <!-- (1) Load JQuery from the Google AJAX Libraries API CDN. -->
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script>
</head>
<body>
  <a href="http://jquery.com/">jQuery</a>
  <a href="http://google.com/" class="clickme">I give a message when you leave</a>
  <a href="http://yahoo.com/" class="hideme">Click me to hide!</a>
  <a href="http://microsoft.com">I'm a normal link</a>
  <script type="text/javascript">
    // $(document).ready(function(){$("a").click(function(event){alert("Thanks for visiting!");});});
    // $("a").addClass("test");
    // $("a").click(function(event){alert("As you can see, the link no longer took you to jquery.com");event.preventDefault();$(this).hide("slow");});
    $("a")
        .filter(".clickme")
            .click(function(){
                alert("You are now leaving the site.");
            }).end()
        .filter(".hideme")
            .click(function(){
                $(this).hide();
                return false;
            })
        .end();
  </script>
</body>
</html>
